import Vue from 'vue'
import Vuex from 'vuex'
// import { UserInfo } from '@/api/login'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userData: {
      avatar: '111',
      username: '22',
    },
    token: sessionStorage.getItem('token')
  },
  mutations: {
    // queryUserInfo(state){
    //   UserInfo({
    //     token: this.token
    //   }).then((result)=>{
    //     const {data} = result;
    //     state.avatar = data.avatar
    //   })
    // }
  },
  actions: {
  },
  modules: {
  }
})
